<?php

use Faker\Generator as Faker;
use App\Models\Forum;
use App\Models\User;
use App\Models\Topic;

$factory->define(Topic::class, function (Faker $faker) {
    static $forums;
    return [
//        'title' => $faker->sentence,
        'forum_key' => ($forums ?: $forums = Forum::all())->random()->key,
    ];
});
